﻿
namespace NMemcached.Client
{
    /// <summary>
    /// Defines methods required to compress and decompress data
    /// </summary>
    public interface ICompressor
    {
        /// <summary>
        /// Compresses a sequence of bytes
        /// </summary>
        /// <param name="data">The sequence of bytes to be compressed</param>
        /// <returns>The compressed sequence of bytes</returns>
        byte[] Compress(byte[] data);

        /// <summary>
        /// Decompresses a sequence of bytes
        /// </summary>
        /// <param name="data">The sequence of bytes to be decompressed</param>
        /// <returns>The decompressed sequence of bytes</returns>
        byte[] Decompress(byte[] data);
    }
}
